from pydantic import BaseModel
from typing import Optional


class CreateWorkstationRequest(BaseModel):
    name: str
    initial_url: Optional[str] = None
    callback_url: Optional[str] = None
    workstation_id: Optional[str] = None
    reuse_cache: bool = True


class SendMessageRequest(BaseModel):
    uid: str
    message: str


class OpenWorkstationRequest(BaseModel):
    workstation_id: str


class GetUserOrderRequest(BaseModel):
    uid: str


class MoveConversationRequest(BaseModel):
    uid: str
    username: str
    reason: str


class UpdateNoteTagRequest(BaseModel):
    order_sn: str
    remark: str
    remark_tag: str = 'RED'
    remark_tag_name: str = '红色'

class GetRecommendGoodsRequest(BaseModel):
    uid: str
    page_num: int = 1
    page_size: int = 10


class SendUserHelpLinkRequest(BaseModel):
    link_type: int
    uid: str
    order_sn: str

class SendGoodsCardRequest(BaseModel):
    uid: str
    goods_id: int


class OrdergeneralRequest(BaseModel):
    order_sn: str

class ApplicationApplyRequest(BaseModel):
    """
    小额打款申请请求模型
    """
    order_sn: str
    transfer_reason: int = 2
    transfer_amount: int
    apply_note: str


class SetCallbackUrlRequest(BaseModel):
    """
    设置回调地址请求模型
    """
    url: str


class AskRefundApplyRequest(BaseModel):
    """售后申请"""
    order_sn: str
    after_sales_type: int
    question_type: int
    refund_amount: int
    message: str = None